package pe.com.drokasa.mirror.conectores;

import java.util.Enumeration;

/**
 * @author Synopsis S.A
 *
 */
public interface Connection 
{
	/**
	 * @param name
	 */
	public void setName(String name);
  
	/**
	 * @return
	 */
	public String getName();

	/**
	 * @return
	 */
	public int open();

	/**
	 * @return
	 */
	public int send();

	/**
	 * 
	 */
	public void close();

	/**
	 * @param node
	 */
	public void setNode(String node);

	/**
	 * @return
	 */
	public String getNode();

	/**
	 * @param port
	 */
	public void setPort(int port);

	/**
	 * @return
	 */
	public int getPort();

	/**
	 * @param nodeFallback
	 */
	public void setNodeFallback(String nodeFallback);

	/**
	 * @return
	 */
	public String getNodeFallback();

	/**
	 * @param portFallback
	 */
	public void setPortFallback(int portFallback);

	/**
	 * @return
	 */
	public int getPortFallback();

	/**
	 * @param nodeDestination
	 */
	public void setNodeDestination(String nodeDestination);

	/**
	 * @return
	 */
	public String getNodeDestination();

	/**
	 * @param username
	 */
	public void setUsername(String username);

	/**
	 * @return
	 */
	public abstract String getUsername();

	/**
	 * @param password
	 */
	public void setPassword(String password);

	/**
	 * @return
	 */
	public String getPassword();

	/**
	 * @param timeou
	 */
	public void setTimeout(int timeou);

	/**
	 * @return
	 */
	public int getTimeout();

	/**
	 * 
	 */
	public void setTimestamp();

	/**
	 * @return
	 */
	public long getTimestamp();

	/**
	 * @param status
	 */
	public void setStatus(int status);

	/**
	 * @return
	 */
	public int getStatus();

	/**
	 * @param errorMessage
	 */
	public void setErrorMessage(String errorMessage);

	/**
	 * @return
	 */
	public String getErrorMessage();

	/**
	 * @param message
	 */
	public void setMessage(String message);

	/**
	 * @return
	 */
	public String getMessage();

	/**
	 * @return
	 */
	public byte[] getMessageBytes();

	/**
	 * @param response
	 */
	public void setResponse(String response);

	/**
	 * @param responesAsBytes
	 */
	public void setResponse(byte[] responesAsBytes);

	/**
	 * 
	 */
	public void reset();

	/**
	 * @param maxLenData
	 */
	public void setMaxLenData(int maxLenData);

	/**
	 * @return
	 */
	public int getMaxLenData();

	/**
	 * @return
	 */
	public String getResponse();

	/**
	 * @param attributeName
	 * @param attributeAsInt
	 * @return
	 */
	public Connection addAttribute(String attributeName, int attributeAsInt);

	/**
	 * @param attributeName
	 * @param attributeAsInteger
	 * @return
	 */
	public Connection addAttribute(String attributeName, Integer attributeAsInteger);

	/**
	 * @param attributeName
	 * @param attributeAsObject
	 * @return
	 */
	public Connection addAttribute(String attributeName, Object attributeAsObject);

	/**
	 * @param attributeName
	 * @param attributeAsString
	 * @return
	 */
	public Connection addAttribute(String attributeName, String attributeAsString);

	/**
	 * @return
	 */
	public Enumeration<String> attributes();

	/**
	 * @return
	 */
	public Enumeration<String> values();

	/**
	 * @param attributeName
	 * @return
	 */
	public Object getAttribute(String attributeName);
}